Stream build script output to the console
authorAlex Crichton <alex@alexcrichton.com>
Thu, 14 Apr 2016 06:37:57 +0000 (23:37 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Tue, 14 Jun 2016 14:35:51 +0000 (07:35 -0700)
commit26690d33e483ea83236413ea424d748251aa2696
tree59b5348c4c876f80d053683f251b5a23c44602a7
parent805dfe4e7964da509ea6dbc733b40ffcca21d874
Stream build script output to the console

This commit alters Cargo's behavior when the `-vv` option is passed (two verbose
flags) to stream output of all build scripts to the console. Cargo makes not
attempt to prevent interleaving or indicate *which* build script is producing
output, rather it simply forwards all output to one to the console.

Cargo still acts as a middle-man, capturing the output, to parse build script
output and interpret the results. The parsing is still deferred to completion
but the stream output happens while the build script is running.

On Unix this is implemented via `select` and on Windows this is implemented via
IOCP.

Closes #1106
Cargo.lock
Cargo.toml
src/cargo/ops/cargo_rustc/custom_build.rs
src/cargo/ops/cargo_rustc/job.rs
src/cargo/ops/cargo_rustc/job_queue.rs
src/cargo/ops/cargo_rustc/mod.rs
src/cargo/util/errors.rs
src/cargo/util/mod.rs
src/cargo/util/read2.rs [new file with mode: 0644]
tests/build-script.rs